//选座操作记录
const mongoose = require("mongoose");

const { Schema, model } = mongoose;

const SeatslogSchema = new  Schema ({ 
  //教室名
  roomName: { type: String, require: true },
  //座位位置
  place: { type: String, require: true },
  //座位标识
  seatKey: { type: String, require: true},
  //占用人-学号
  username: { type: String, require: true },
  //占用人-名字
  nickname: { type: String, require: true },
  //占用预约开始时间
  startTime: { type: Number, require: true},
  //预计结束时间
  estimateTime: { type: Number, default: '' },
  //实际结束时间
  endTime: { type: Number, default: ''},
  //座位操作 1->归还 2->占用
  status: { type: Number, default: 1},
  //创建时间
  createTime: { type: Number, require: true },
});

const Seatslog = model("Seatslog", SeatslogSchema);

module.exports = Seatslog;